﻿<navigation:Page x:Class="SilverlightShowWCFRIAColl.Views.EntitySetView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
                 xmlns:dts="clr-namespace:SilverlightShowWCFRIAColl"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="EntitySetView Page">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        
        <TextBlock Text="Entity Set" FontSize="18"></TextBlock>

        <StackPanel Orientation="Horizontal"
                    Grid.Row="1" Margin="0,10">
            <Button Command="{Binding LoadMoreBooks}" Width="150" 
                    Content="Load more"></Button>
            <Button Command="{Binding AddBook}"
                    Width="150"
                    Content="Add book"></Button>
            <Button Command="{Binding DeleteBook}"
                    Width="150"
                    Content="Delete book"></Button>
        </StackPanel>


        <ListBox Grid.Row="2"
                 ItemsSource="{Binding Books}">
            <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="{Binding Title}"></TextBlock>
                            <TextBlock Text="{Binding Author}"></TextBlock>
                        </StackPanel>
                    </DataTemplate>
            </ListBox.ItemTemplate>

        
        </ListBox>
        

    </Grid>
</navigation:Page>
